<template>
  <div class="cart">
    <nav-tab class="nav-bar">
      <div slot="center">购物车({{num}})</div>
    </nav-tab>
    <cart-list></cart-list>
    <cart-bot-bar></cart-bot-bar>
  </div>
</template>

<script>
  import NavTab from "../../components/common/navtab/NavTab";
  import CartList from "./childComps/cartList";
  import CartBotBar from "./childComps/cartBotBar";
  export default {
    name: "Cart",
    components: {CartBotBar, CartList, NavTab},
    computed: {
      num() {
        return this.$store.state.cartList.length;
      }
    }
  }
</script>

<style scoped>
  .nav-bar{
    background-color: #ff8198;
    font-size: 18px;




  }
</style>